package com.hilda.twitter.timeline.io;

import java.io.IOException;
import java.net.URLConnection;

import android.graphics.Bitmap;

import com.google.android.imageloader.BitmapContentHandler;
import com.hilda.twitter.timeline.utils.ImageHelper;

public class RoundedCornersBitmapContentHandler extends BitmapContentHandler {

	private final static int ROUNDED_CORNER_PIXELS = 2;

	@Override
	public Bitmap getContent(URLConnection connection) throws IOException {
		Bitmap bitmap = super.getContent(connection);
		return ImageHelper
				.getRoundedCornerBitmap(bitmap, ROUNDED_CORNER_PIXELS);
	}

}
